/*
 * @Description:
 * @Author: LCL
 * @Date: 2021-11-26
 * @LastEditors: LCL
 * @LastEditTime: 2021-11-26
 * @FilePath: /beff/src/pages/ApprovalList/detail/service.ts
 */

import { getCookie } from '@/utils/utils';
import { request } from 'umi';

export async function getDetailData(
  type: string,
  params: { sn: string },
): Promise<API.IResponse<any>> {
  const token = getCookie('token');
  return request(`/bpm/api/${type}/detail`, {
    params: params,
    headers: {
      Authorization: `Bearer ${token}`,
    },
  });
}
